#include <vector>
using namespace std;
class Solution {
public:
  int minCostToMoveChips(vector<int> &position) {
    int two = 0;
    int one = 0;
    for (int i = 0; i < position.size(); ++i) {
      if (position[i] % 2 == 0) {
        ++two;
      } else {
        ++one;
      }
    }
    if (two > one)
      return one;
    return two;
  }
};
